package com.reflectapply2.apply1;

import com.example1.Person;
import org.junit.Test;

import java.util.ArrayList;
import java.util.LinkedList;

//1、反射创建对象的案例
public class NewInstanceTest {
    @Test
    public void test() throws InstantiationException, IllegalAccessException {
        Class<Person> personClass = Person.class;
        Person person = personClass.newInstance();
        System.out.println(person);


    }
}
